﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Web.Mvc;
using BoneSystem.Extensions.Annotations.InputTypeAnnotations.RelatedClasses;

namespace BoneSystem.Extensions.Annotations.InputTypeAnnotations
{
    public class RadioAttribute : Attribute
    {
        public RadioListHelper RadioListHelper { get; set; }
        public IList<RadioItemAttribute> RadioItemAttributes { get; set; }
        public TagBuilder TagBuilder()
        {
            var tag = new TagBuilder("div");
            foreach (var radioItemAttribute in RadioItemAttributes)
            {
                tag.InnerHtml += radioItemAttribute.TagBuilder().ToString(TagRenderMode.EndTag);
            }
            return tag;
        }
    }
}
